import { BaseDecorator } from "./BaseDecorator";

export class SMSDecorator extends BaseDecorator {

    private phoneNumber: string
    constructor(baseNotifier, phoneNumber: string) {
        super(baseNotifier)
        this.phoneNumber = phoneNumber;

    }

    send(message: string): void {
        // 调用父类的send方法
        super.send(message)
        // 完成子类扩展的逻辑
        console.log(`SMS send to ${this.phoneNumber} , ${message}`)

    }
}